package com.example.demo.sys.service.impl;

import java.util.List;
import java.util.ArrayList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.demo.sys.dao.DicMapper;
import com.example.demo.sys.service.DicService;
import com.example.demo.sys.service.bo.DicBO;
import com.example.demo.sys.entity.Dic;

@Service
public class DicServiceImpl implements DicService {
	@Autowired
	private DicMapper dicMapper;
	
	@Override
	public List<DicBO> getDics() {
		List<Dic> dics = dicMapper.getDics();
		List<DicBO> result = new ArrayList<>();
		for(int i=0;i<dics.size();i++) {
			result.add(DicBO.convert(dics.get(i)));
		}
		return result;
	}

}
